home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / fputs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.4 KB  |  72 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: fputs.c,v 1.3 1996/08/13 13:52:46 digulla Exp $
  4.     $Log: fputs.c,v $
  5.     Revision 1.3  1996/08/13 13:52:46  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:51  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include <dos/dosextens.h>
  17. #include "dos_intern.h"
  18.  
  19. /*****************************************************************************
  20.  
  21.     NAME */
  22.     #include <clib/dos_protos.h>
  23.  
  24.     __AROS_LH2(LONG, FPuts,
  25.  
  26. /*  SYNOPSIS */
  27.     __AROS_LHA(BPTR,   file,   D1),
  28.     __AROS_LHA(STRPTR, string, D2),
  29.  
  30. /*  LOCATION */
  31.  
  32.     struct DosLibrary *, DOSBase, 56, Dos)
  33.  
  34. /*  FUNCTION
  35.  
  36.     INPUTS
  37.     file   - Filehandle to write to.
  38.     string - String to write.
  39.  
  40.     RESULT
  41.     0 if all went well or EOF in case of an error.
  42.     IoErr() gives additional information in that case.
  43.  
  44.     NOTES
  45.  
  46.     EXAMPLE
  47.  
  48.     BUGS
  49.  
  50.     SEE ALSO
  51.     FGetC(), IoErr()
  52.  
  53.     INTERNALS
  54.  
  55.     HISTORY
  56.     29-10-95    digulla automatically created from
  57.                 dos_lib.fd and clib/dos_protos.h
  58.  
  59. *****************************************************************************/
  60. {
  61.     __AROS_FUNC_INIT
  62.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  63.     
  64.     while(*string)
  65.         if(FPutC(file,*string++)<0)
  66.             return EOF;
  67.             
  68.     return 0;
  69.     
  70.     __AROS_FUNC_EXIT
  71. } /* FPuts */
  72.